<html>
<head>
    <title>add</title>
</head>
<body>
<div style="width: 800px">
    <form id="forms" class="form-horizontal" role="form">
        <div class="form-group">
            <label for="a" class="col-sm-2 control-label">旅游地风景:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="a" placeholder="请输入旅游地风景" name="rname">
            </div>
        </div>
        <div class="form-group">
            <label for="b" class="col-sm-2 control-label">旅游地价格:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="b" placeholder="请输入旅游地价格" name="price">
            </div>
        </div>
        <div class="form-group">
            <label for="c" class="col-sm-2 control-label">旅游地简介:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="c" placeholder="请输入旅游地简介"
                       name="routeintroduce">
            </div>
        </div>
        <div class="form-group">
            <label for="d" class="col-sm-2 control-label">上架时间:</label>
            <div class="col-sm-4">
                <input type="date" class="form-control" id="d" placeholder="请输入上架时间" name="rdate">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">是否是旅游主题:</label>
            <div class="col-sm-4">
                是:<input type="radio" name="isthemetour" value="0"> &nbsp&nbsp&nbsp
                否:<input type="radio" name="isthemetour" value="1">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">旅游线路分类:</label>
            <div class="col-sm-3">
                <div class="form-group">
                    <select class="form-control" name="cid" id="cid">
                        <th:block th:each="c : ${TabCategory}">
                            <option th:value="${c.cid}"><span th:text="${c.cname}"></span></option>
                        </th:block>
                    </select>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="g" class="col-sm-2 control-label">旅游地址风景图:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="g" placeholder="旅游地址风景图" name="rimage">
                <input type="file" id="newsImg" name="myFile" multiple/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">旅游线路分类:</label>
            <div class="col-sm-3">
                <div class="form-group">
                    <select class="form-control" name="sid" id="sid">
                        <th:block th:each="s : ${TabSeller}">
                            <option th:value="${s.sid}"><span th:text="${s.sname}"></span></option>
                        </th:block>
                    </select>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="h" class="col-sm-2 control-label">数据的来源id:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="h" placeholder="请输入抓取数据的来源id" name="sourceid">
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $('#newsImg').fileinput({
        language: 'zh',
        uploadUrl: '/file/upLoadFile',
        enctype: "multipart/form-data",
        browseClass: 'btn btn-primary'
    });
    $('#newsImg').on("fileuploaded", function (event, data, previewId, index) {
        $("#g").val(data.response.imgUrl);
    });
</script>
</body>
</html>

